package user;

import java.util.List;

import exceptions.profile.InvalidPropertyException;
import user.blog.Blog;
import user.blog.BlogIF;
import user.blog.post.Post;
import user.profile.*;

/**
 * 
 * @author Cassio Cabral Deal with the user.
 */
public interface UserIF {
	/**
	 * Get some profile information from this user.
	 * 
	 * @param flag
	 * @return String with the info.
	 * @throws InvalidPropertyException
	 */
	public String getPersonalDataFromProfile(Flags flag)
			throws InvalidPropertyException;

	public Profile getProfile();

	public String getLogin();
	
	public void setLogin(String login) throws Exception;

	public void setProfile(Profile newProfile);

	public void setBlogs(List<BlogIF> blogs);

	public void setPassword(String newPassword) throws Exception;

	/**
	 * This method will define(automatically) a new valid sessionID.
	 * @throws Exception 
	 */
	public void setNewSessionID() throws Exception;

	public String getSessionID();

	public Blog getBlogByTitle(String title) throws Exception;

	/**
	 * 
	 * @return A list of blogs owned by this user.
	 */
	public List<BlogIF> getBlogs();

	String createBlog(String idSession, String title, String description)
			throws Exception;
	
	String createSubBlog(String blogFather,
			String title, String description) throws Exception;

	public boolean deleteProfile() throws InvalidPropertyException, Exception;
	
	public boolean deleteBlog(String blogID) throws Exception;

	public boolean deleteBlogs() throws InvalidPropertyException, Exception;

	public boolean save() throws Exception;

	BlogIF getBlogByBID(String bid) throws Exception;

	BlogIF getBlogByIndex(Integer index);

	String getPersonalDataFromProfile(String flag)
			throws InvalidPropertyException;

	Post getPostByPID(String pid) throws Exception;

	void removePost(String pid) throws Exception;

}
